package com.lyh.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 这是登陆用户
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {
    private Integer userId;//自增主键

    //登陆要使用的identify
    private String phone;

    private String username;
    private String password;
    private boolean active;

    private String salt;

    @Override
    public String toString(){
        return username;
    }

    public User(String phone, String username, String password, boolean active, String salt) {
        this.phone = phone;
        this.username = username;
        this.password = password;
        this.active = active;
        this.salt = salt;
    }
}